<template>
	<view>
		<videoCustom :isBack="true" :bgColor="bgColor" :isCity="true" @headerSwitch="changeHeader"></videoCustom>
		<!-- 视频组件 -->
		<view v-show="SwitchCur==2">
			<zh-video v-if="videoList&&videoList.length>0" class="video" :showType="SwitchCur" :videoList="videoList"></zh-video>
			<view style="height: 90vh;width: 100%;padding-top: 100rpx;" v-if="!videoList||videoList.length==0" class="text-center bg-black">没有数据</view>
		</view>
		<view v-show="SwitchCur==3">
		<zh-video class="video" :showType="SwitchCur" :videoList="cityVideoList"></zh-video>
		<view style="height: 90vh;width: 100%;padding-top: 100rpx;" v-if="!cityVideoList||cityVideoList.length==0" class="text-center bg-black">没有数据</view>
		
		</view>
		<view v-show="SwitchCur==1">
		</view>
	</view>
</template>

<script>
	import videoCustom from './video-custom.vue';
	export default {
		components: {
			videoCustom
		},
		data() {
			return {
				SwitchCur:2,
				bgColor:null,
				videoList:[{videoId:123,videoUrl:'https://ewm.rsj.jinhua.gov.cn/jhrs/api/common/file/download/jycy/ee3dfd9c80664de6b18c7d12eab2122b',coverUrl:'https://ewm.rsj.jinhua.gov.cn/jhrs/api/common/file/show/jycy/1ec78e6a412c48c5849f62e51e34fa1c',publisher:'测试人',videoDescribe:'测试123动物荣威 偶尔我而误入我入我我让无而哦呜热偶乌尔㬳肉肉我入我让我入围哦任务额荣未肒人无偶然吴荣伟任务动物荣我让无饿哦如我入围哦额入围哦额入围row',likeFlag:false,danmuList:[{
                    text: '第 1s 出现的弹幕',
                    color: '#ff0000',
                    time: 1
                },
				{
				    text: '第 1s 出现的弹幕111',
				    color: '#ff0000',
				    time: 1
				},
                {
                    text: '第 3s 出现的弹幕',
                    color: '#ff00ff',
                    time: 3
                }]},
				{videoId:124,videoUrl:'https://ewm.rsj.jinhua.gov.cn/jhrs/api/common/file/show/jycy/ee3dfd9c80664de6b18c7d12eab2122b',coverUrl:'https://ewm.rsj.jinhua.gov.cn/jhrs/api/common/file/show/jycy/1ec78e6a412c48c5849f62e51e34fa1c',publisher:'测试人',videoDescribe:'测试123',likeFlag:false,danmuList:[]},
				{videoId:124,videoUrl:'https://ewm.rsj.jinhua.gov.cn/jhrs/api/common/file/show/jycy/ee3dfd9c80664de6b18c7d12eab2122b',coverUrl:'https://ewm.rsj.jinhua.gov.cn/jhrs/api/common/file/show/jycy/1ec78e6a412c48c5849f62e51e34fa1c',publisher:'测试人',videoDescribe:'测试123',likeFlag:false,danmuList:[]},
				{videoId:124,videoUrl:'https://ewm.rsj.jinhua.gov.cn/jhrs/api/common/file/show/jycy/ee3dfd9c80664de6b18c7d12eab2122b',coverUrl:'https://ewm.rsj.jinhua.gov.cn/jhrs/api/common/file/show/jycy/1ec78e6a412c48c5849f62e51e34fa1c',publisher:'测试人',videoDescribe:'测试123',likeFlag:false,danmuList:[]}],
				cityVideoList:[]
			}
		},
		methods: {
			changeHeader(e){
				console.log(e)
				this.SwitchCur=e
				if(e==1){
					//关注
					this.bgColor = 'bg-gradual-blue-light'
				}else if(e==2){
					//推荐
					if(this.videoList&&this.videoList.length>0){
						this.bgColor = null
					}else{
						this.bgColor = 'bg-black'
					}
				}else if(e==3){
					//同城
					if(this.cityVideoList&&this.cityVideoList.length>0){
						this.bgColor = null
					}else{
						this.bgColor = 'bg-black'
					}
				}
			}
		}
	}
</script>

<style>

</style>
